package cn.com.dcsgo.mapper;

import cn.com.dcsgo.domain.po.SaleOpportunity;
import cn.com.dcsgo.domain.vo.SaleOpportunityVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

/**
 * 针对表【sale_opportunity(销售机会表)】的数据库操作Mapper
 *
 * @author Dcsgo
 * @since 13/5/2025 上午 10:54
 */
public interface SaleOpportunityMapper extends BaseMapper<SaleOpportunity> {

    /**
     * 分页条件查询销售机会(预期交易金额降序)
     *
     * @param pageParam                 分页参数
     * @param saleOpportunityId         销售机会id
     * @param custName                  客户名称
     * @param phone                     客户联系方式
     * @param grade                     客户等级
     * @param custType                  客户类型
     * @param expectedTransactionAmount 预期交易金额
     * @param currentStage              销售状态
     * @param sourceChannelId           销售渠道id
     * @param empId                     业务员id
     * @return 分页结果
     */
    IPage<SaleOpportunityVO> selectSaleOpportunityVOPage(Page<SaleOpportunityVO> pageParam,
                                                         @Param("saleOpportunityId") Long saleOpportunityId,
                                                         @Param("custName") String custName,
                                                         @Param("phone") String phone,
                                                         @Param("grade") Integer grade,
                                                         @Param("custType") String custType,
                                                         @Param("expectedTransactionAmount") Double expectedTransactionAmount,
                                                         @Param("currentStage") String currentStage,
                                                         @Param("sourceChannelId") Long sourceChannelId,
                                                         @Param("empId") Long empId);
}




